package com.uinnova.springboot.beetl;

import com.uinnova.springboot.mongodb.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.ArrayList;
import java.util.Arrays;

@Controller
public class BeetlController {
    @GetMapping(value = "/beetl/login")
    public ModelAndView login(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("/ceshi.html");
        //        arrays.aslist将数组转化为集合
        modelAndView.addObject("list", Arrays.asList("1","2","3"));
        User user = new User("12","wanggang12","12");
        modelAndView.addObject("user",user);
        return  modelAndView;
    }
}
